package com.bsj.power.common.def.entity.tree;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * @author LiJiaXin
 * @version 1.0.0
 * @description Tree
 * @time 2024/10/9 11:53
 */
@Data
@TableName("tab_tree")
public class Tree {

    /**
     * 树id
     */
    @TableId(value = "tree_id", type = IdType.AUTO)
    private Integer treeId;

    /**
     * 上级id 最上级为-1
     */
    @TableField("parent_id")
    private Integer parentId;

    /**
     * 树名称
     */
    @TableField("tree_name")
    private String treeName;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

}
